next
Round
Technologies
Saved
Summary
Login
next
Round
Technologies
Saved
Summary
Login
Question Loading...
Web Workers
1. What is a Web Worker and why do we need it? What problem does it solve in the browser?
Level: Expert | Frequency: High
2. What are the three types of Web Workers? How do they differ from each other?
Level: Expert | Frequency: High
3. How do you create a Web Worker and communicate with it?
Level: Expert | Frequency: High
4. What is the postMessage / onmessage pattern? Is communication synchronous or asynchronous?
Level: Expert | Frequency: High
5. What APIs and features are not available inside a Web Worker? (e.g., DOM, window, document)
Level: Expert | Frequency: High
6. What is the Structured Clone Algorithm? How is it different from JSON serialization? What types can and cannot be cloned?
Level: Expert | Frequency: High
7. What are Transferable Objects? How does transferring an ArrayBuffer differ from cloning it, and why does it matter for performance?
Level: Expert | Frequency: High
8. How do you handle errors inside a Web Worker? What events are available and what information do they expose?
Level: Expert | Frequency: High
9. What is a Shared Worker? How can multiple browser tabs communicate through one? What are its limitations?
Level: Expert | Frequency: High
10. How do you terminate a Web Worker? What's the difference between worker.terminate() and self.close()?
Level: Expert | Frequency: High
11. How would you architect a thread pool using Web Workers to process a large task queue efficiently?
Level: Expert | Frequency: High
12. What is SharedArrayBuffer and Atomics? How do they enable true shared memory between the main thread and workers? What security headers are required to use them?
Level: Expert | Frequency: High
13. What are the performance trade-offs of using Web Workers? When can they actually hurt performance (e.g., small tasks, frequent postMessage calls)?
Level: Expert | Frequency: High
14. How would you use Web Workers with WebAssembly (WASM) for CPU-intensive tasks? What makes this combination powerful?
Level: Expert | Frequency: High
15. How do Module Workers work (type: 'module')? What advantages do they offer over classic workers?
Level: Expert | Frequency: High
16. In a React or Vue app, how would you integrate a Web Worker cleanly without breaking the component lifecycle? Have you used libraries like comlink — how does it simplify the worker communication model?
Level: Expert | Frequency: High
17. What is the lifecycle of a Service Worker (install → activate → fetch)? How do you handle cache versioning and old worker cleanup?
Level: Expert | Frequency: High
18. What is the difference between cache.put(), cache.add(), and cache.addAll()? How do you implement a cache-first vs network-first strategy?
Level: Expert | Frequency: High
19. How do you communicate between a Service Worker and the main thread? What is the role of BroadcastChannel vs postMessage here?
Level: Expert | Frequency: High
20. Can Web Workers access localStorage?
Level: Expert | Frequency: High
All Topics
Basics
Engine
JIT
V8
Event Loop and Runtime
Concurrency and Threading
Bytecode and Parsing
Execution Context
Data Types
Functions
String Operations
Array Operations
this
Call Apply Bind
Closure
Objects
ES6 Classes
Events
ES6
Promises
Iterator and Generator
Error Handling
Web Workers
PWA
Web Sockets
Web Assembly
Garbage Collector
Modules
Browser APIS
Functional Programming
Currying
Higher Order Functions
Memoisation
Security
Code
Polyfills